set(LIB_NAME ossim_atp_plugin)

cmake_minimum_required(VERSION 2.8)

message(" OSSIM_INSTALL_PREFIX = <${OSSIM_INSTALL_PREFIX}>")
message(" OSSIM_DEV_HOME = <${OSSIM_DEV_HOME}>")

file(GLOB_RECURSE OSSIMPLUGIN_SRCS *.cpp *.c)
file(GLOB_RECURSE OSSIMPLUGIN_HEADERS *.h)

# Adjust the install library path:
if(OSSIM_INSTALL_PLUGINS_WITH_VERSION)
   set(INSTALL_LIBRARY_DIR   "${INSTALL_LIBRARY_DIR}/ossim-${OSSIM_VERSION}/plugins")
else(OSSIM_INSTALL_PLUGINS_WITH_VERSION)
   set(INSTALL_LIBRARY_DIR   "${INSTALL_LIBRARY_DIR}/ossim/plugins")
endif(OSSIM_INSTALL_PLUGINS_WITH_VERSION)
if(WIN32)
 set(INSTALL_RUNTIME_DIR "${INSTALL_RUNTIME_DIR}/ossim/plugins")
endif()

OSSIM_LINK_LIBRARY(${LIB_NAME}
                   COMPONENT_NAME ossim TYPE "${OSSIM_PLUGIN_LINK_TYPE}"
         LIBRARIES ${OSSIM_LIBRARY} ${requiredLibs}
                   HEADERS "${OSSIMPLUGIN_HEADERS}"
         SOURCE_FILES "${OSSIMPLUGIN_SRCS}"
                   INSTALL_LIB)

